{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "bbfd4a2b",
   "metadata": {},
   "source": [
    "# 创建DataFrame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "f2b3027b",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import ast"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "543ff710",
   "metadata": {},
   "outputs": [],
   "source": [
    "a=np.array([[1,2,3],[4,5,6]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "e7c5ef91",
   "metadata": {},
   "outputs": [],
   "source": [
    "p1=pd.DataFrame(a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "3e54a0c6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   0  1  2\n",
       "0  1  2  3\n",
       "1  4  5  6"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "97766b88",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pandas.core.frame.DataFrame"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(p1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "4596e73d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1, 2, 3],\n",
       "       [4, 5, 6]])"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p1.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "c1b75cf2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RangeIndex(start=0, stop=2, step=1)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p1.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "8152bbf4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RangeIndex(start=0, stop=3, step=1)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p1.columns"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b203b0c4",
   "metadata": {},
   "source": [
    "# 修改行列名称"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "842c737f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>列0</th>\n",
       "      <th>列1</th>\n",
       "      <th>列2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>行0</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>行1</th>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    列0  列1  列2\n",
       "行0   1   2   3\n",
       "行1   4   5   6"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.DataFrame(a,index=[\"行0\",\"行1\"],columns=[\"列0\",\"列1\",\"列2\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "61eb6c68",
   "metadata": {},
   "outputs": [],
   "source": [
    "p1=pd.read_csv(\"award.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "0b9f61ea",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>奖学金名称</th>\n",
       "      <th>奖学金类型</th>\n",
       "      <th>奖励等级</th>\n",
       "      <th>评定学年</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>['', '本科优秀学生奖学金', '本科优秀学生奖学金', '本科优秀学生奖学金']</td>\n",
       "      <td>['', '学校奖学金', '学校奖学金', '学校奖学金']</td>\n",
       "      <td>['', '三等奖学金', '三等奖学金', '三等奖学金']</td>\n",
       "      <td>['', '2018-2019学年', '2019-2020学年', '2020-2021学年']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>['', '本科优秀学生奖学金', '本科优秀学生奖学金']</td>\n",
       "      <td>['', '学校奖学金', '学校奖学金']</td>\n",
       "      <td>['', '三等奖学金', '二等奖学金']</td>\n",
       "      <td>['', '2019-2020学年', '2020-2021学年']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>['', '本科优秀学生奖学金']</td>\n",
       "      <td>['', '学校奖学金']</td>\n",
       "      <td>['', '三等奖学金']</td>\n",
       "      <td>['', '2018-2019学年']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>['', '本科优秀学生奖学金', '本科优秀学生奖学金', '本科优秀学生奖学金']</td>\n",
       "      <td>['', '学校奖学金', '学校奖学金', '学校奖学金']</td>\n",
       "      <td>['', '一等奖学金', '一等奖学金', '二等奖学金']</td>\n",
       "      <td>['', '2018-2019学年', '2019-2020学年', '2020-2021学年']</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Unnamed: 0                                        奖学金名称  \\\n",
       "0           0  ['', '本科优秀学生奖学金', '本科优秀学生奖学金', '本科优秀学生奖学金']   \n",
       "1           1               ['', '本科优秀学生奖学金', '本科优秀学生奖学金']   \n",
       "2           2                            ['', '本科优秀学生奖学金']   \n",
       "3           3                                         ['']   \n",
       "4           4  ['', '本科优秀学生奖学金', '本科优秀学生奖学金', '本科优秀学生奖学金']   \n",
       "\n",
       "                             奖学金类型                             奖励等级  \\\n",
       "0  ['', '学校奖学金', '学校奖学金', '学校奖学金']  ['', '三等奖学金', '三等奖学金', '三等奖学金']   \n",
       "1           ['', '学校奖学金', '学校奖学金']           ['', '三等奖学金', '二等奖学金']   \n",
       "2                    ['', '学校奖学金']                    ['', '三等奖学金']   \n",
       "3                             ['']                             ['']   \n",
       "4  ['', '学校奖学金', '学校奖学金', '学校奖学金']  ['', '一等奖学金', '一等奖学金', '二等奖学金']   \n",
       "\n",
       "                                                评定学年  \n",
       "0  ['', '2018-2019学年', '2019-2020学年', '2020-2021学年']  \n",
       "1                 ['', '2019-2020学年', '2020-2021学年']  \n",
       "2                                ['', '2018-2019学年']  \n",
       "3                                               ['']  \n",
       "4  ['', '2018-2019学年', '2019-2020学年', '2020-2021学年']  "
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p1.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "02d019ee",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>奖学金名称</th>\n",
       "      <th>奖学金类型</th>\n",
       "      <th>奖励等级</th>\n",
       "      <th>评定学年</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>6901</th>\n",
       "      <td>6901</td>\n",
       "      <td>['', '浩瀚奖助学金']</td>\n",
       "      <td>['', '社会奖学金']</td>\n",
       "      <td>['', '不分等级']</td>\n",
       "      <td>['', '2019-2020学年']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6902</th>\n",
       "      <td>6902</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6903</th>\n",
       "      <td>6903</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6904</th>\n",
       "      <td>6904</td>\n",
       "      <td>['', '本科优秀学生奖学金']</td>\n",
       "      <td>['', '学校奖学金']</td>\n",
       "      <td>['', '三等奖学金']</td>\n",
       "      <td>['', '2020-2021学年']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6905</th>\n",
       "      <td>6905</td>\n",
       "      <td>['', '本科优秀学生奖学金', '本科优秀学生奖学金']</td>\n",
       "      <td>['', '学校奖学金', '学校奖学金']</td>\n",
       "      <td>['', '三等奖学金', '三等奖学金']</td>\n",
       "      <td>['', '2019-2020学年', '2020-2021学年']</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      Unnamed: 0                           奖学金名称                   奖学金类型  \\\n",
       "6901        6901                  ['', '浩瀚奖助学金']           ['', '社会奖学金']   \n",
       "6902        6902                            ['']                    ['']   \n",
       "6903        6903                            ['']                    ['']   \n",
       "6904        6904               ['', '本科优秀学生奖学金']           ['', '学校奖学金']   \n",
       "6905        6905  ['', '本科优秀学生奖学金', '本科优秀学生奖学金']  ['', '学校奖学金', '学校奖学金']   \n",
       "\n",
       "                        奖励等级                                评定学年  \n",
       "6901            ['', '不分等级']                 ['', '2019-2020学年']  \n",
       "6902                    ['']                                ['']  \n",
       "6903                    ['']                                ['']  \n",
       "6904           ['', '三等奖学金']                 ['', '2020-2021学年']  \n",
       "6905  ['', '三等奖学金', '三等奖学金']  ['', '2019-2020学年', '2020-2021学年']  "
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p1.tail()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d5f86792",
   "metadata": {},
   "source": [
    "# set_index 设置某一列columns名为索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "500a7b7e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>奖学金名称</th>\n",
       "      <th>奖学金类型</th>\n",
       "      <th>评定学年</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>奖励等级</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>['', '三等奖学金', '三等奖学金', '三等奖学金']</th>\n",
       "      <td>0</td>\n",
       "      <td>['', '本科优秀学生奖学金', '本科优秀学生奖学金', '本科优秀学生奖学金']</td>\n",
       "      <td>['', '学校奖学金', '学校奖学金', '学校奖学金']</td>\n",
       "      <td>['', '2018-2019学年', '2019-2020学年', '2020-2021学年']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>['', '三等奖学金', '二等奖学金']</th>\n",
       "      <td>1</td>\n",
       "      <td>['', '本科优秀学生奖学金', '本科优秀学生奖学金']</td>\n",
       "      <td>['', '学校奖学金', '学校奖学金']</td>\n",
       "      <td>['', '2019-2020学年', '2020-2021学年']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>['', '三等奖学金']</th>\n",
       "      <td>2</td>\n",
       "      <td>['', '本科优秀学生奖学金']</td>\n",
       "      <td>['', '学校奖学金']</td>\n",
       "      <td>['', '2018-2019学年']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>['']</th>\n",
       "      <td>3</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>['', '一等奖学金', '一等奖学金', '二等奖学金']</th>\n",
       "      <td>4</td>\n",
       "      <td>['', '本科优秀学生奖学金', '本科优秀学生奖学金', '本科优秀学生奖学金']</td>\n",
       "      <td>['', '学校奖学金', '学校奖学金', '学校奖学金']</td>\n",
       "      <td>['', '2018-2019学年', '2019-2020学年', '2020-2021学年']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>['', '不分等级']</th>\n",
       "      <td>6901</td>\n",
       "      <td>['', '浩瀚奖助学金']</td>\n",
       "      <td>['', '社会奖学金']</td>\n",
       "      <td>['', '2019-2020学年']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>['']</th>\n",
       "      <td>6902</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>['']</th>\n",
       "      <td>6903</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "      <td>['']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>['', '三等奖学金']</th>\n",
       "      <td>6904</td>\n",
       "      <td>['', '本科优秀学生奖学金']</td>\n",
       "      <td>['', '学校奖学金']</td>\n",
       "      <td>['', '2020-2021学年']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>['', '三等奖学金', '三等奖学金']</th>\n",
       "      <td>6905</td>\n",
       "      <td>['', '本科优秀学生奖学金', '本科优秀学生奖学金']</td>\n",
       "      <td>['', '学校奖学金', '学校奖学金']</td>\n",
       "      <td>['', '2019-2020学年', '2020-2021学年']</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>6906 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                 Unnamed: 0  \\\n",
       "奖励等级                                          \n",
       "['', '三等奖学金', '三等奖学金', '三等奖学金']           0   \n",
       "['', '三等奖学金', '二等奖学金']                    1   \n",
       "['', '三等奖学金']                             2   \n",
       "['']                                      3   \n",
       "['', '一等奖学金', '一等奖学金', '二等奖学金']           4   \n",
       "...                                     ...   \n",
       "['', '不分等级']                           6901   \n",
       "['']                                   6902   \n",
       "['']                                   6903   \n",
       "['', '三等奖学金']                          6904   \n",
       "['', '三等奖学金', '三等奖学金']                 6905   \n",
       "\n",
       "                                                                       奖学金名称  \\\n",
       "奖励等级                                                                           \n",
       "['', '三等奖学金', '三等奖学金', '三等奖学金']  ['', '本科优秀学生奖学金', '本科优秀学生奖学金', '本科优秀学生奖学金']   \n",
       "['', '三等奖学金', '二等奖学金']                        ['', '本科优秀学生奖学金', '本科优秀学生奖学金']   \n",
       "['', '三等奖学金']                                              ['', '本科优秀学生奖学金']   \n",
       "['']                                                                    ['']   \n",
       "['', '一等奖学金', '一等奖学金', '二等奖学金']  ['', '本科优秀学生奖学金', '本科优秀学生奖学金', '本科优秀学生奖学金']   \n",
       "...                                                                      ...   \n",
       "['', '不分等级']                                                  ['', '浩瀚奖助学金']   \n",
       "['']                                                                    ['']   \n",
       "['']                                                                    ['']   \n",
       "['', '三等奖学金']                                              ['', '本科优秀学生奖学金']   \n",
       "['', '三等奖学金', '三等奖学金']                        ['', '本科优秀学生奖学金', '本科优秀学生奖学金']   \n",
       "\n",
       "                                                           奖学金类型  \\\n",
       "奖励等级                                                               \n",
       "['', '三等奖学金', '三等奖学金', '三等奖学金']  ['', '学校奖学金', '学校奖学金', '学校奖学金']   \n",
       "['', '三等奖学金', '二等奖学金']                    ['', '学校奖学金', '学校奖学金']   \n",
       "['', '三等奖学金']                                      ['', '学校奖学金']   \n",
       "['']                                                        ['']   \n",
       "['', '一等奖学金', '一等奖学金', '二等奖学金']  ['', '学校奖学金', '学校奖学金', '学校奖学金']   \n",
       "...                                                          ...   \n",
       "['', '不分等级']                                       ['', '社会奖学金']   \n",
       "['']                                                        ['']   \n",
       "['']                                                        ['']   \n",
       "['', '三等奖学金']                                      ['', '学校奖学金']   \n",
       "['', '三等奖学金', '三等奖学金']                    ['', '学校奖学金', '学校奖学金']   \n",
       "\n",
       "                                                                              评定学年  \n",
       "奖励等级                                                                                \n",
       "['', '三等奖学金', '三等奖学金', '三等奖学金']  ['', '2018-2019学年', '2019-2020学年', '2020-2021学年']  \n",
       "['', '三等奖学金', '二等奖学金']                          ['', '2019-2020学年', '2020-2021学年']  \n",
       "['', '三等奖学金']                                                  ['', '2018-2019学年']  \n",
       "['']                                                                          ['']  \n",
       "['', '一等奖学金', '一等奖学金', '二等奖学金']  ['', '2018-2019学年', '2019-2020学年', '2020-2021学年']  \n",
       "...                                                                            ...  \n",
       "['', '不分等级']                                                   ['', '2019-2020学年']  \n",
       "['']                                                                          ['']  \n",
       "['']                                                                          ['']  \n",
       "['', '三等奖学金']                                                  ['', '2020-2021学年']  \n",
       "['', '三等奖学金', '三等奖学金']                          ['', '2019-2020学年', '2020-2021学年']  \n",
       "\n",
       "[6906 rows x 4 columns]"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p1.set_index(\"奖励等级\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "b2878222",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"['', '三等奖学金', '二等奖学金']\""
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p1.iloc[1][\"奖励等级\"]   #访问表中的某个元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "54d44e86",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0       ['', '学校奖学金', '学校奖学金', '学校奖学金']\n",
       "1                ['', '学校奖学金', '学校奖学金']\n",
       "2                         ['', '学校奖学金']\n",
       "3                                  ['']\n",
       "4       ['', '学校奖学金', '学校奖学金', '学校奖学金']\n",
       "                     ...               \n",
       "6901                      ['', '社会奖学金']\n",
       "6902                               ['']\n",
       "6903                               ['']\n",
       "6904                      ['', '学校奖学金']\n",
       "6905             ['', '学校奖学金', '学校奖学金']\n",
       "Name: 奖学金类型, Length: 6906, dtype: object"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p1[\"奖学金类型\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "2f37607c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Unnamed: 0                                     1\n",
       "奖学金名称             ['', '本科优秀学生奖学金', '本科优秀学生奖学金']\n",
       "奖学金类型                     ['', '学校奖学金', '学校奖学金']\n",
       "奖励等级                      ['', '三等奖学金', '二等奖学金']\n",
       "评定学年          ['', '2019-2020学年', '2020-2021学年']\n",
       "Name: 1, dtype: object"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p1.iloc[1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "154135c0",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": false,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "47.71px",
    "left": "1069.81px",
    "top": "287.7px",
    "width": "158.99px"
   },
   "toc_section_display": false,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
